home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ShellDef.h
-
- Contains: All non-local definitions for the "shell," meaning not
- only the DocShell, but also DraftWindow and the launcher. The impetus
- for combining previously separate files is to avoid resource id conflicts
- within the shell subsystem and between it an the rest of OpenDoc
-
- Merged from: DfWinDef.h, ODXDef.h, and RlShlDef.h
-
- Owned by: Nick Pilch
-
- Copyright: © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <16> 7/30/96 eeh 1372943: kODAlertShellGenericError and
- kODAlertShellCorruptDocError
- <15> 17.07.1996 NP 1369268: Change app heap size.
- <14> 6/27/96 TJ Removed editor type, now using CFMtype for
- system headers.
- <13> 6/23/96 NP 10002: Launch time speedups.
- <12> 6/21/96 jpa T10002: Changed min/default heap size to
- 210k. 1358818: Added rsrc ID for File menu.
- <11> 6/21/96 eeh task 10008: add buttons etc. for AppleGuide
- <10> 6/19/96 NP 10002: Launch time speedups.
- <9> 6/18/96 NP 10002: Launch time speedups.
- <8> 6/14/96 NP 10002: Launch time speedups
- <7> .06.1996 NP 10002: Launch time fixes, system process.
- <6> 5/31/96 jpa T10012: Added Quit menu cmd for CyberDog
- (does not appear in regular docs!)
- <5> .04.1996 NP 1286751: Present alert when trying to use
- Open… when no Finder is running.
- <4> 4/15/96 TJ Nolonger include ODXDef.h
- <3> 3/29/96 DM 1334273: rsrc const for new alert 493
- <2> .03.1996 NP 1307182: Removed STR# index constant.
- <4> 10/31/95 TJ Made the Splash Screen Non-Modal.#1297413
- <3> 10/26/95 TÇ 1296574 GM:Cannot set default memory
- partition size.
- <2> 10/24/95 jpa 1293441: Added more SpaceIsLow alerts.
- <1> 9/29/95 eeh 1287262: first checked in
-
- In Progress:
-
- NP: We only have to have unique resource numbers for resources of the
- same kind. Currently, every resource is given a new unique number here.
- We are going to run out of numbers in our range if we don't change the
- scheme.
-
- LDEFs can have the same ID as anything, since having that ID means
- nothing. (That is, there's no assumption in the code or toolbox like
- the one that DLOG and DITL ids will match.)
-
- */
-
- #ifndef _SHELLDEF_
- #define _SHELLDEF_
-
- #ifndef _RSRCBASE_
- #include "RsrcBase.h"
- #endif
-
-
- #define SUPPORT_QUIT /* Define to add Quit cmd for APPL processes only, *not* documents */
-
- #ifdef SUPPORT_QUIT
- #define kODCommandQuit (kODCommandPrint + 1) /*//jpa $$$$$ Should be in CmdDef.idl*/
- /* CyberDog uses the value of this constant so don't mess with it unnecessarily */
- #endif
-
-
- #define kODShellLDEFRsrcBase kODShellRsrcBase
-
- /*****************************************************************************
- From: RlShlDef.h
- The constants following are for the DocShell itself
- *****************************************************************************/
-
- // File menu to use instead of Document menu in 'APPL' process:
- #define kODFileMenuID (kODShellRsrcBase + 0)
-
- // Do you want to save changes before closing? DLOG
- #define kSHLsvChanges (kODShellRsrcBase + 0)
-
- // Revert to the last saved version? DLOG
- #define kSHLsvRevert (kODShellRsrcBase + 1)
-
- // Delete this document? DLOG
- #define kSHLDeleteDLOG (kODShellRsrcBase + 2)
-
- // Error Handling ALRT & errs & STR#
- #define kSHLphGenError (kODShellRsrcBase + 3)
-
- // Low-memory ALRTs:
- #define kSHLphSpaceIsLow (kODShellRsrcBase + 4)
- #define kSHLphAppSpaceIsLow (kODShellRsrcBase + 5)
- #define kSHLphSpaceIsLowNoSave (kODShellRsrcBase + 31)
- #define kSHLphAppSpaceIsLowNoSave (kODShellRsrcBase + 32)
-
- #define kODErrUserID (kODShellRsrcBase + 6)
- #define kODErrSupportID (kODShellRsrcBase + 7)
-
- #define kODErrUserIDStrings (kODShellRsrcBase + 8)
- #define kODErrSupportIDStrings (kODShellRsrcBase + 9)
-
- // Dragged-to-Trash alert [DISABLED]
- // #define kSHLDragToTrashAlert (kODShellRsrcBase + 10)
-
- #define kSHLsvChangesCmdKeyStrs kSHLsvChanges
- #define kSHLsvRevertCmdKeyStrs kSHLsvRevert
- #define kSHLDeleteDLOGCmdKeyStrs kSHLDeleteDLOG
-
- // Save A Copy dialog
- #define kSHLSaveCopyDlgID (kODShellRsrcBase + 11)
- #define kSHLSaCDocumentIconID (kODShellRsrcBase + 12)
- #define kSHLSaCStationeryIconID (kODShellRsrcBase + 13)
- #define kSHLSaCDocumentRadioBtn 13
- #define kSHLSaCStationeryRadioBtn 14
- #define kSHLSaCKindPopupItem 15
- #define kSHLSaCDocumentIconItem 16
- #define kSHLSaCStationeryIconItem 17
-
- #define kSHLSaCKindPopupMenu (kODShellRsrcBase + 14)
-
- // Folder Name strings searching
- #define kODEditorsFldrStrID (kODShellRsrcBase + 15)
- #define kODOpenDocPartsFolderStrID (kODShellRsrcBase + 16)
- #define kODShellPlugInFolderStrID (kODShellRsrcBase + 17)
- #define kODStationeryFldrStrID (kODShellRsrcBase + 18)
-
- // Shell Strings STR#
- #define kSHLStrsID (kODShellRsrcBase + 19)
- //#define kSHLStrIndAboutOD 1
- /* #define kSHLStrIndMClose 2 */
- /* #define kSHLStrIndMCloseDoc 3 */
- #define kSHLStrIndMPartInfo 2
- #define kSHLStrIndDSaveACopy 3
- #define kSHLStrIndDException 4
- #define kSHLStrIndDSaveAs 5
-
- // Shell default save a copy string
- #define kSHLCopyDefaultStrID (kODShellRsrcBase + 20)
-
- // Shell opening pre-OD document name string
- #define kSHLPreODDocNameStrID (kODShellRsrcBase + 21)
-
- // Shell new filename construction template
- #define kSHLNewFilenameTemplateStrID (kODShellRsrcBase + 22)
-
- // Shell menuitem text construction templates
- #define kSHLSaveItemTemplateStrID (kODShellRsrcBase + 23)
- #define kSHLCloseItemTemplateStrID (kODShellRsrcBase + 24)
- #define kSHLDeleteItemTemplateStrID (kODShellRsrcBase + 25)
-
- #define kSHLPlugInErrorStrID (kODShellRsrcBase + 26)
-
- // STR#-misc errors
- #define kSHLMiscErrorStringsStrID (kODShellRsrcBase + 48)
- #define kSHLCannotRunUnderMacOS8Index 1
-
- // Save To Different Volume dialog
- #define kSHLSaveDiffVolDialogID (kODShellRsrcBase + 27)
-
- #define kODXDoubleClickAlert (kODShellRsrcBase + 44)
-
- // Private error codes. Before adding more, check ErrorDef.idl to ensure uniqueness.
- #define kODErrAllWritableVolumesAreFull -29826
- #define kODErrVolumesIsFull -29825
- #define kODErrDirectoryNotHaveWriteAccess -29824
- #define kODErrCannotSaveACopyOntoCurrentDoc -29823
- #define kODErrCannotSaveACopyOntoBusyDoc -29822
- #define kODErrSystemVolumeIsFull -29821
- #define kODErrCouldNotBindForeignDocument -29820
- #define kODErrCannotFindShellPlugInsFolder -29819
- #define kODErrCannotFindSystemEditorsFolder -29818
- #define kODErrCannotFindOpenDocLibrariesFolder -29817
- #define kODErrEditorLibraryNotFound -29816
- #define kODErrCannotSaveAsOntoBusyDoc -29815
-
- #define kSHLAboutBoxDlogID (kODShellRsrcBase + 28)
-
-
- /*****************************************************************************
- From: ODXDef.h
- The constants following are for the launcher part of the "shell"
- *****************************************************************************/
-
- // ALRT resource IDs
- #define kODXErrAlert (kODShellRsrcBase + 29)
- #define kODXAnonErrAlert (kODShellRsrcBase + 30)
-
- // THESE SHOULD GO INTO A STR# RESOURCE!
-
- // Prefs file name resource ID
- #define kSHLPrefsFileNameResID (kODShellRsrcBase + 31)
- #define kSHLPrefsFolderNameResID (kODShellRsrcBase + 43)
- #define kSHLLauncherNameResID (kODShellRsrcBase + 46)
- #define kSHLSystemProcessNameResID (kODShellRsrcBase + 47)
- #define kSHLOldLauncherNameResID (kODShellRsrcBase + 49)
-
-
- #define kPrefFileType 'pref'
- // for stationery creation
- #define kDocSeedResType 'seed'
- #define kDocSeedResID 1
-
- // Document Stub Data Document Stub App
- // kDocStubRsrcType kDocStubRsrcID0 kcfrgRsrcType kcfrgID
- // kDocStubRsrcType kDocStubRsrcID1 kMainCFMType kMainCFMPPCID
- // kDocStubRsrcType kDocStubRsrcID2 kscszRsrcType kscszID
- // kDocStubRsrcType kDocStubRsrcID3 kMainCFMType kMainCFM68KID
- // kDocStubRsrcType kDocStubRsrcID4 kMainCFMType kMainCFM68KID1
- // kDocStubRsrcType kDocStubRsrcID5 kCODERsrcType kCODEID0
- // kDocStubRsrcType kDocStubRsrcID6 kCODERsrcType kCODEID1
- // kDocStubRsrcType kDocStubRsrcID7 kCODERsrcType kCODEID6
- // kDocStubRsrcType kDocStubRsrcID8 kCODERsrcType kCODEID7
- // kDocStubRsrcType kDocStubRsrcID9 kMainCFMType kSOMMemCFM68KID
- // kDocStubRsrcType kDocStubRsrcID10 kMainCFMType kSOMMemCFMPPCID
- // kSIZERsrcType kDocStubSIZEID kSIZERsrcType kSIZEID
- //
-
- // for document stub data (e.g. types & ids of the doc stub app resources when stored
- // in OpenDoc™ & OpenDoc Shell)
- #define kSIZERsrcType 'SIZE'
- #define kDocStubSIZEID 3
-
- // Default SIZE ID for use if there is no prefs file:
- #define kDocStubDefaultSIZEID 4
-
- #define kDocStubRsrcType 'DSDT' // for Document Stub DaTa, i.e. how these resources
- // are actually stored in OpenDoc™ & OpenDoc Shell
- // except for the SIZE resource which we keep as
- // a SIZE resource for the convenience of editing it
- // in Resedit.
-
- #define kDocStubRsrcID0 0
- #define kDocStubRsrcID1 1
- #define kDocStubRsrcID2 2
- #define kDocStubRsrcID3 3
- #define kDocStubRsrcID4 4
- #define kDocStubRsrcID5 5
- #define kDocStubRsrcID6 6
- #define kDocStubRsrcID7 7
- #define kDocStubRsrcID8 8
- #define kDocStubRsrcID9 9
- //#define kDocStubRsrcID10 10
-
- // for document stub construction
- #define kMainCFMType 'rseg' // used to be 'DSTB' for Document STuB
- // but CFM68K uses 'rseg'.
- #define kMainCFM68KID 0
- #define kMainCFM68KID1 1
- #define kMainCFMPPCID 2
- #define kSOMMemCFM68KID 3
- #define kSOMMemCFMPPCID 4
-
- #define kcfrgRsrcType 'cfrg'
- #define kcfrgID 0
- #define kscszRsrcType 'scsz'
- #define kscszID 0
-
- #define kDocStubStackSize (64 * 1024) // 64K stack size
-
- // Note: the following two constants are duplicated in InfoDlg.cpp!
- // Be sure to keep them in sync.
- // 1242449 Should probably create a common ≈def.h constant kDocStubMinHeapSize
- // accessible from both subsystems.
- #define kDocStubMinHeapSize (256 * 1024) // 256K min app heap
- #define kDocStubDefaultSize (320 * 1024) // 320K default app heap [Was 384k in 1.0.4]
-
- #define kCODERsrcType 'CODE'
- #define kCODEID0 0
- #define kCODEID1 1
- #define kCODEID6 6
- //#define kCODEID7 7
-
- #define kSIZEID -1
-
- // Strings for the Launcher
- #define kODXLibsFldrStrID (kODShellRsrcBase + 32)
- #define kODXLibsFldrStrIndex 1
- #define kODXTriedToOpenPrefsStrIndex 2
-
- #define kLaunchFailedErrStrings (kODShellRsrcBase + 33)
-
-
- /*****************************************************************************
- From: DfWinDef.h
- The constants following are for the Draft Window part of the shell
- *****************************************************************************/
-
- /* DLOG IDs */
- #define kDraftsDlgID (kODShellRsrcBase + 34)
- #define kCreateDraftsDlgID (kODShellRsrcBase + 35)
- #define kDeleteDraftsDlogID (kODShellRsrcBase + 36)
-
- /* 'STR ' IDs */
- #define kDraftsWnTitleResID (kODShellRsrcBase + 37)
- #define kDraftsWnDateSpaceResID (kODShellRsrcBase + 38)
-
- /* LDEF stuff */
- #define kDWNumColumns 4
- #define kDraftWinLDEFID (kODShellLDEFRsrcBase + 0)
- #define kDraftWinLDEFAddrOffset 0x00000008
-
- /* fields in Drafts dialog */
- #define kDraftsCreateBtn 1
- #define kDraftsDoneBtn 2
- #define kDraftsDeleteBtn 3
- #define kDraftsOpenBtn 4
- #define kDraftsCreatorStaticTxt 5
- #define kDraftsDraftStaticTxt 6
- #define kDraftsCreatedStaticTxt 7
- #define kDraftsArrowStaticTxt 8 /* a null string */
- #define kDraftsCommentStaticTxt 9
- #define kDraftsHeaderRectUserItem 10
- #define kDraftsHorizRectUserItem 11
- #define kDraftsListUserItem 12
- #define kDraftsCreateUserItem 13
- #define kDraftsDoneUserItem 14
- #define kDraftsAGButtonItem 15
-
- #define kDraftsCmdKeyStrs (kODShellRsrcBase + 39)
- #define kDraftsCreateCmdKeyStrs (kODShellRsrcBase + 40)
-
- /* fields in Create Drafts dialog */
- #define kCreateDraftsCreateBtn 1
- #define kCreateDraftsCancelBtn 2
- #define kCreateDraftsDraftStaticTxt 3
- #define kCreateDraftsNameStaticTxt 4
- #define kCreateDraftsNameEditTxt 5
- #define kCreateDraftsCommentsStaticTxt 6
- #define kCreateDraftsCommentsEditTxt 7
- #define kCreateDraftsDraftEditTxt 8
- #define kCreateDraftsAGButtonItem 9
-
- /* fields in Delete Drafts dialog */
- #define kDeleteDraftsDeleteBtn 1
- #define kDeleteDraftsCancelBtn 2
- #define kDeleteDraftsStaticTxt 3
-
- #define kDWClosedTriangleResID (kODShellRsrcBase + 41)
- #define kDWOpenTriangleResID (kODShellRsrcBase + 42)
-
- #define kODAlertShellLowMemoryError (kODShellRsrcBase + 43)
- #define kODAlertShellFinderNotRunning (kODShellRsrcBase + 45)
- #define kODAlertShellGenericError (kODShellRsrcBase + 46)
- #define kODAlertShellCorruptDocError (kODShellRsrcBase + 47)
-
- /*The Splash Screen Dialog ID */
- #define kODSplashDlogID 131
-
-
- #define kODSystemProcessSignature 'odbg'
- #define kODDisabledProcessSignature 'odno'
-
-
- #endif /* _SHELLDEF_ */
-
-